import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import { pageList } from "./page";

const routes: Readonly<RouteRecordRaw[]> = [
  {
    path: "/",
    redirect: "/parallax",
  },
  ...pageList,
  {
    path: "/401",
    meta: {
      process: false,
    },
    component: () => import("/$/error/401.vue"),
  },
  {
    path: "/403",
    meta: {
      process: false,
    },
    component: () => import("/$/error/403.vue"),
  },
  {
    path: "/404",
    meta: {
      process: false,
    },
    component: () => import("/$/error/404.vue"),
  },
  {
    path: "/500",
    meta: {
      process: false,
    },
    component: () => import("/$/error/500.vue"),
  },
  {
    path: "/502",
    meta: {
      process: false,
    },
    component: () => import("/$/error/502.vue"),
  },
];

const routerList = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default routerList;
